package com.macro.mall.portal.domain;

import lombok.Getter;

/**
 * 消息队列枚举配置
 * Created by macro on 2018/9/14.
 */
@Getter
public enum QueueEnum {

    /**
     * 订单取消消息通知队列
     */
    QUEUE_ORDER_CANCEL("mall.order.direct", "mall.order.cancel", "mall.order.cancel"),
    /**
     * 订单取消消息通知ttl队列
     */
    QUEUE_TTL_ORDER_CANCEL("mall.order.direct.ttl", "mall.order.cancel.ttl", "mall.order.cancel.ttl"),
    /**
     * 分销订单创建消息通知队列
     */
    QUEUE_DISTRIBUTION_CREAT("mall.distribution.direct", "mall.distribution.creat", "mall.distribution.creat"),
    /**
     * 消息通知ttl队列
     */
    QUEUE_TTL_DISTRIBUTION_CREAT("mall.distribution.direct.ttl", "mall.distribution.creat.ttl", "mall.distribution.creat.ttl"),
    /**
     * 取消团购
     */
    QUEUE_GROUP_BUY_CANCEL("quyum.group.buy.direct", "quyum.group.buy.cancel", "quyum.group.buy.cancel"),
    /**
     * 取消团购
     */
    QUEUE_TTL_GROUP_BUY_CANCEL("quyum.group.buy.direct.ttl", "quyum.group.buy.cancel.ttl", "quyum.group.buy.cancel.ttl"),
    /**
     * 取消团购订单
     */
    QUEUE_GROUP_BUY_ORDER_CANCEL("quyum.group.buy.order.direct", "quyum.group.buy.order.cancel", "quyum.group.buy.order.cancel"),
    /**
     * 取消团购订单
     */
    QUEUE_TTL_GROUP_BUY_ORDER_CANCEL("quyum.group.buy.order.direct.ttl", "quyum.group.buy.order.cancel.ttl", "quyum.group.buy.order.cancel.ttl"),
    /**
     * 取消秒杀
     */
    QUEUE_SEC_KILL_CANCEL("quyum.sec.kill.direct", "quyum.sec.kill.cancel", "quyum.sec.kill.cancel"),
    /**
     * 取消秒杀
     */
    QUEUE_TTL_SEC_KILL_CANCEL("quyum.sec.kill.direct.ttl", "quyum.sec.kill.cancel.ttl", "quyum.sec.kill.cancel.ttl");

    /**
     * 队列名称
     */
    private String name;
    /**
     * 交换名称
     */
    private String exchange;
    /**
     * 路由键
     */
    private String routeKey;

    QueueEnum(String exchange, String name, String routeKey) {
        this.exchange = exchange;
        this.name = name;
        this.routeKey = routeKey;
    }
}
